<include file="public/head"/>
<include file="public/scripts"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('QbtAppUpdate://AdminIndex/index')}">app更新</a></li>
        <li class="active"><a href="">版本编辑</a></li>
    </ul>
    <form action="{:cmf_plugin_url('QbtAppUpdate://AdminIndex/edit_post')}" method="post" class=" form-horizontal  js-ajax-form margin-top-20"  enctype="multipart/form-data">
        <div class="row">
            <div class="col-md-9">
                <table class="table table-bordered">
                    <tr>
                        <th width="100">所属类型<span class="form-required"></span></th>
                        <td>
                            <input type="hidden" name="type" value="{$info.type}">
                            <input type="hidden" name="id" value="{$info.id}">
                            <if condition="$info.type eq 1">
                                安卓
                                <elseif condition="$info.type eq 2" />
                                ios
                                <elseif condition="$info.type eq 3" />
                                小程序
                            </if>
                        </td>
                    </tr>
                    <tr>
                        <th>api标识：</th>
                        <td>
                            <input type="text" class="form-control" name="iden" value="{$info.iden}" readonly="readonly">
                        </td>
                    </tr>
                    <if condition="$info.type neq 1">

                        <tr class="box"><th>名称：</th>
                            <td>
                                <input type="text" class="form-control" name="app_name1" value="{$info.app_name}" <if condition="$info.type eq 1">readonly="readonly"</if>>
                            </td>
                        </tr>
                        <tr class="box"><th>版本号：</th>
                            <td>
                                <input type="text" class="form-control" name="version_code1" value="{$info.version_code}" <if condition="$info.type eq 1">readonly="readonly"</if>>
                            </td>
                        </tr>
                        <tr class="hqsgf" <if condition="$info.type neq 2"> style="display: none"</if>>
                        <th>版本更新地址：</th>
                            <td>
                                <input type="text" name="apk_url" class="form-control" value="{$info.apk_url}">
                            </td>
                        </tr>
                    <else />

                        <tr class="apk_box" >
                            <th>apk包</th>
                            <td>
                                <input type="file" name="apk_url" value="">
                                <a class="url_a" href="{$info.apk_url}">点我下载</a>
                            </td>
                        </tr>
                        <tr class="hqsgf">
                            <th>名称：</th>
                            <td><input type="text" name="app_name" class="form-control" value="{$info.app_name}"><p class="help-block">若在安卓时填写名称，包名，版本名称，版本号，那将变成手动获取，请将填项填写完整！</p></td>
                        </tr>
                        <tr class="hqsgf">
                            <th>包名：</th>
                            <td><input type="text" name="packge_name" class="form-control" value="{$info.packge_name}"></td>

                        </tr>
                        <tr class="hqsgf">
                            <th>版本名称：</th>
                            <td><input type="text" name="version_name" class="form-control" value="{$info.version_name}"></td>
                        </tr>
                        <tr class="hqsgf">
                            <th>版本号：</th>
                            <td><input type="text" name="version_code" class="form-control" value="{$info.version_code}"></td>
                        </tr>

                    </if>
                    <tr>
                        <th>强制更新：</th>
                        <td>
                            <input type="checkbox" name="force" value="1" <if condition="$info.force eq 1">checked</if>>
                        </td>
                    </tr>
                    <tr>
                        <th>更新备注：</th>
                        <td>
                            <textarea name="upgrade_point" id="" cols="100" rows="5">{$info.upgrade_point}</textarea>
                        </td>
                    </tr>

                </table>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
                        <a class="btn btn-default" href="javascript:history.back(-1)">{:lang('BACK')}</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>



</body>
</html>
